package com.example.java11_zklock.controller;

import com.example.java11_zklock.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GoodsController {

    @Autowired
    private IGoodsService goodsService;

    @RequestMapping("/buy")
    public String buy(Long goodsId,Long count) throws Exception {
        return goodsService.buyGoods(goodsId,count);
    }
}
